﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Index : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void bt_autenticacion_Click(object sender, EventArgs e)
    {
        string webser = "";
        string datos = "";
        try
        {
            webser = utility.setXml(username.Text, password.Text, 2, -1);
            
            com.bpophotos.www.Service service = new com.bpophotos.www.Service();
            datos = service.ValidaUsuario(webser);
            if (datos != null || datos != "")
            {
                RE_GenericBean rgb = utility.getUserLogin(datos);
                if (rgb.intC1 == 0) { error.Visible = true; }
                else {
                    Session["user"] = (RE_GenericBean)rgb;
                    Response.Redirect("ams/Ams_general.aspx"); 
                }
            }
        }
        catch (Exception s)
        {
            
        }
        

    }
}